<?php 
include 'connect/connect.php';
//$username = $_SESSION['username'];
$tid=$_GET['id'];
$query = "SELECT * FROM apps WHERE id='$tid'";
//var_dump($query);
$result = mysql_query($query) or die("Error executing '$query':" . mysql_error());
    while ($row = mysql_fetch_assoc($result)) {
        extract($row);
  } 
?>
<form action="?update=1&id=<?php echo $tid; ?> " method="POST">
    <table border='1'>
        <tr>
            <td>Application Name</td>
            <td><input type="text" name="app_name" value="<?php  echo $app_name;  ?>"/></td>
        </tr>
        <tr>
            <td>Home page Url</td>
            <td><input type="text" name="app_url" value="<?php  echo $app_url;  ?>"/></td>
        </tr>
       
        <tr>
            <td colspan="2" style="text-align: right;"><input type="submit" value='Update'/></td>
        </tr>
    </table>
</form>